package cool.mtc.minghe.web.config;

import lombok.EqualsAndHashCode;
import lombok.Getter;
import org.springframework.security.authentication.AbstractAuthenticationToken;
import org.springframework.security.core.GrantedAuthority;

import java.util.Collection;

/**
 * @author 明河
 */
@Getter
@EqualsAndHashCode(callSuper = true)
public class WebSocketAuthToken extends AbstractAuthenticationToken {
    private final String id;
    private final String sessionId;

    public WebSocketAuthToken(Collection<? extends GrantedAuthority> authorities, String id, String sessionId) {
        super(authorities);
        this.id = id;
        this.sessionId = sessionId;
    }

    @Override
    public Object getCredentials() {
        return null;
    }

    @Override
    public Object getPrincipal() {
        return null;
    }
}
